The present disclosure is directed to a method and system for self-registration and self-assembly of separate electrical devices into a hierarchical computer architecture. The electrical devices may be energy storage devices, and the energy storage devices can self-assemble into a dynamically scalable storage system that can be used in an energy storage facility. The energy that is stored in the energy storage devices that are assembled into the storage system can be used in a variety of different scenarios, including applications such as peak-shaving, emergency power, and system stability control with duty cycles ranging from seconds to several hours.